<template>
	<view class="wrap">
		<goodsList :list="goodList" :isJifen="1" :activityId="activityId" :detailType="1"></goodsList>
	</view>
</template>

<script>
	import goodsList from '@/components/goods-list.vue'
	export default {
		components: {
			goodsList
		},
		data() {
			return {
				goodList: [], //商品列表
				activityId:''
			}
		},
		onLoad(options) {
			this.activityId = options.activityId
		},
		onShow() {
			this.getGoodsList(); // 获取抢购商品列表
		},
		methods: {
			// 获取抢购商品列表
			getGoodsList() {
				this.$http('index.getGoodsList', {}, '获取中...').then(res => {
					if (res.code == 1) {
						this.goodList = res.data.data
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #F6F7F9;
		padding: 20rpx;
	}
</style>